<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
        <link href="styles/forms.css"></link>
    </h:head>
    <h:body>
        <f:view>
            <h:form id="Client">

                <h:panelGrid columns="3">
                    <h:outputLabel value="Id" for="id"/>
                    <h:inputText id="id" 
                                 required="false" 
                                 value="#{clientBean.id}" 
                                 validator="#{clientBean.validateId}"/>
                    <h:message for="id" />

                    <h:outputLabel value="Nom" for="nom"/>
                    <h:inputText id="nom" 
                                 required="false" 
                                 value="#{clientBean.nom}" 
                                 validator="#{clientBean.validateNom}"/>
                    <h:message for="nom" />

                    <h:outputLabel value="Prenom" for="prenom"/>
                    <h:inputText id="prenom" 
                                 required="false" 
                                 value="#{clientBean.prenom}" 
                                 validator="#{clientBean.validatePrenom}"/>
                    <h:message for="prenom" />

                    <h:outputLabel value="Sexe" for="sexe"/>
                    <h:inputText id="sexe" 
                                 required="false" 
                                 value="#{clientBean.sexe}" 
                                 validator="#{clientBean.validateSexe}"/>
                    <h:message for="sexe" />

                    <h:outputLabel value="Ville" for="ville"/>
                    <h:inputText id="ville" 
                                 required="false" 
                                 value="#{clientBean.ville}" 
                                 validator="#{clientBean.validateVille}"/>
                    <h:message for="ville" />

                    <h:outputLabel value="Pays" for="pays"/>
                    <h:inputText id="pays" 
                                 required="false" 
                                 value="#{clientBean.pays}" 
                                 validator="#{clientBean.validatePays}"/>
                    <h:message for="pays" />

                    <h:outputLabel value="cp" for="cp"/>
                    <h:inputText id="cp" 
                                 required="false" 
                                 value="#{clientBean.cp}" 
                                 validator="#{clientBean.validateCp}"/>
                    <h:message for="cp" />

                    <h:outputLabel value="Adresse" for="adresse"/>
                    <h:inputText id="adresse" 
                                 required="false" 
                                 value="#{clientBean.adresse}" 
                                 validator="#{clientBean.validateAdresse}"/>
                    <h:message for="adresse" />

                    <h:outputLabel value="Email" for="email"/>
                    <h:inputText id="email" 
                                 required="false" 
                                 value="#{clientBean.email}" 
                                 validator="#{clientBean.validateEmail}"/>
                    <h:message for="email" />

                    <h:outputLabel value="Password" for="password"/>
                    <h:inputText id="password" 
                                 required="false" 
                                 value="#{clientBean.password}" 
                                 validator="#{clientBean.validatePassword}"/>
                    <h:message for="password" />

                    <h:outputLabel value="Repassword" for="repassword"/>
                    <h:inputText id="repassword" 
                                 required="false" 
                                 value="#{clientBean.repassword}" 
                                 validator="#{clientBean.validateRepassword}"/>
                    <h:message for="repassword" />
                </h:panelGrid>
                <h:commandButton value="Submit" 
                                 action="#{clientBean.submitAction}"/>
            </h:form>
        </f:view>
    </h:body>
</html>

